package com.example.cashrefund;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.text.Html;
import android.text.method.LinkMovementMethod;
import android.view.Menu;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import android.widget.*;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		TextView lblClickable = (TextView) findViewById(R.id.Registrati);
		String htmlText = "<A HREF='http://www.google.it'>Registrati</A>";
		lblClickable.setText(Html.fromHtml(htmlText));
		//needed to enable click on the lin
		lblClickable.setMovementMethod(LinkMovementMethod.getInstance());
		Button button= (Button) findViewById(R.id.BottoneLogin);
		button.setOnClickListener(new View.OnClickListener() {

			@Override
			public void onClick(View v) {
				startMenuActivity();
			}
		});

	}

	public void startMenuActivity(){
		Intent intent=new Intent(this,MenuActivity.class);
		startActivity(intent);
	}
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.main, menu);
		return true;
	}

}
